package com.xmall.define.request.product;

import com.xmall.define.dto.product.SkuQuantity;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * 库存扣减请求
 */
@Data
public class StockLockRequest implements Serializable {

    /**
     * 订单ID
     */
    @NotNull(message = "订单ID不能为空")
    private Long orderId;

    /**
     * 商品数量集合
     */
    @NotNull(message = "商品数量不能为空")
    @Size(min = 1, message = "商品数量不能为空")
    private List<SkuQuantity> skuQuantityList;
}
